package co.yixiang.modules.quartz.task;

import co.yixiang.modules.activity.service.YxStoreCouponIssueService;
import co.yixiang.modules.activity.service.YxStoreCouponUserService;
import co.yixiang.modules.shop.service.YxStoreOrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author Walert
 * @date 2018-12-25
 */
@Component
@Slf4j
public class CouponTask {

    private final YxStoreCouponUserService couponUserService;
    private final YxStoreCouponIssueService couponIssueService;

    public CouponTask(YxStoreCouponUserService couponUserService,YxStoreCouponIssueService couponIssueService) {
        this.couponUserService = couponUserService;
        this.couponIssueService = couponIssueService;
    }

    public void run(){
        couponUserService.expiredCoupon();
    }
    public void run2(){
        couponIssueService.expiredIssueCoupon();
    }
}
